FROM php:7.3-fpm

# 安装常用扩展（如 MySQL、PDO、GD 等）
RUN apt-get update && apt-get install -y \
    libpng-dev \
    libzip-dev \
    zip \
    git \
    && docker-php-ext-install pdo_mysql gd zip

# 安装Redis扩展
RUN pecl install redis-5.3.7 \
    && docker-php-ext-enable redis

# sockets扩展 依赖库
RUN apt-get update && apt-get install -y \
    libxml2-dev \
    autoconf \
    libtool \
    && rm -rf /var/lib/apt/lists/* 

# 安装sockets扩展 
RUN docker-php-ext-install sockets 

# 安装 Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

WORKDIR /var/www/html